package com.example.practice.service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.practice.mapper.UserMapper;
import com.example.practice.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 *
 * @author zgq
 * @date 2020/10/14 18:15
 */
@DS("one")
@Service
public class UserDb1Service {
    @Autowired
    private UserMapper userMapper;

    public List<User> getAll() {
        return userMapper.selectList(new QueryWrapper<User>());
    }
}
